#include <stdio.h>
#include <sys/statvfs.h>

int main(int argc, char **argv)
{
	struct statvfs vfsInfo;

	statvfs(argv[0], &vfsInfo);

	printf("block size:%d\n", vfsInfo.f_bsize);
	printf("fragment size:%d\n", vfsInfo.f_frsize);
	printf("size of fragment unit:%d\n", vfsInfo.f_blocks);
	printf("Number of free blocks:%d\n", vfsInfo.f_bavail);
	printf("Number of free blocks for users:%d\n", vfsInfo.f_files);
	printf("Number of free inodes:%d\n", vfsInfo.f_ffree);
	printf("Number of free inodes for users:%d\n", vfsInfo.f_favail);
	printf("ID:%d\n", vfsInfo.f_fsid);
	printf("Mount flags:%d\n", vfsInfo.f_flag);
	printf("Maximum filename length:%d\n", vfsInfo.f_namemax);

	return 0;
}
